package com.ss.android.article.browser.view.user.a;

import android.support.v7.widget.RecyclerView.Adapter;
import android.support.v7.widget.RecyclerView.ViewHolder;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.ss.android.article.browser.download.internal.DownloadTask;
import java.util.ArrayList;
import java.util.List;

public final class c extends Adapter {
    final class a extends ViewHolder {
        final TextView a;
        final TextView b;
        final TextView c;

        a(View arg3) {
            super(arg3);
            this.a = this.itemView.findViewById(com.ss.android.article.browser.R.id.x6);
            this.b = this.itemView.findViewById(com.ss.android.article.browser.R.id.x7);
            this.c = this.itemView.findViewById(com.ss.android.article.browser.R.id.x8);
        }
    }

    public List a;

    public c() {

        this.a = new ArrayList();
    }

    public final int getItemCount() {
        return this.a.size();
    }

    public final void onBindViewHolder(ViewHolder arg5, int arg6) {
        Object v0 = this.a.get(arg6);
        if(v0 != null) {
            ((a)arg5).a.setText(((DownloadTask)v0).fileName);
            ((a)arg5).b.setText(com.ss.android.article.browser.c.a.a(((DownloadTask)v0).createTime));
            ((a)arg5).c.setText(com.ss.android.article.browser.download.b.a.a(((DownloadTask)v0).totalSize));
        }
    }

    public final ViewHolder onCreateViewHolder(ViewGroup arg5, int arg6) {
        return new a(LayoutInflater.from(arg5.getContext()).inflate(com.ss.android.article.browser.R.layout.ej, arg5, false));
    }
}

